#include "stdafx.h"

class UiStaticWrapper:public UiStatic
{
private:
	PaintWinFunc pPaintWin;
public:
	UiStaticWrapper(PaintWinFunc pPaintWin)
	{
		this->pPaintWin = pPaintWin;
	}

	virtual void PaintWin(HDC hdc, RECT *prcWin, RECT *prcUpdate)
	{
		this->pPaintWin(hdc,prcWin,prcUpdate);
	}

	virtual void DefaultPaintWin(HDC hdc, RECT *prcWin, RECT *prcUpdate)
	{
		UiStatic::PaintWin(hdc,prcWin,prcUpdate);
	}
};

extern "C"
{
	DLLEXPORT UiStatic* UiStaticCtor()
	{
		return new UiStatic();
	}

	DLLEXPORT UiStaticWrapper* UiStaticWrapperCtor(PaintWinFunc pPaintWin)
	{
		return new UiStaticWrapper(pPaintWin);
	}

	DLLEXPORT void UiStaticDispose(UiStatic* pObj)
	{
		delete pObj;
	}

	DLLEXPORT void UiStaticWrapperDispose(UiStaticWrapper* pObj)
	{
		delete pObj;
	}

	DLLEXPORT void UiStaticWrapperDefaultPaintWin(UiStaticWrapper* pObj,HDC hdc, RECT *prcWin, RECT *prcUpdate)
	{
		pObj->DefaultPaintWin(hdc,prcWin,prcUpdate);
	}
};
